home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Developer Toolbox 6.1
/
SGI Developer Toolbox 6.1 - Disc 4.iso
/
src
/
swtools
/
trubasic
/
rolldemos
/
demos
/
sci
/
meanfit.tru
< prev
next >
Wrap
Text File
|
1994-08-02
|
651b
|
34 lines
!
! MEANFIT. Fit Bezier curve through means of data samples.
!
LIBRARY "sglib.trc"
DIM data(5,15), x(0,0), legends$(0), mean(15), x1(0)
call tw_wset_title(0,"meanfit")
!
! Create fake data and graph it.
!
FOR exp = 1 to 5
FOR pt = 1 to 15
LET data(exp,pt) = 1/pt+rnd/5
NEXT pt
NEXT exp
CALL SetText("Averaged Results","Time","Count")
CALL ManyDataGraph(x,data,0,legends$,"white white cyan")
!
! Draw Bezier fit through means.
!
FOR pt = 1 to 15
LET sum = 0
FOR exp = 1 to 5
LET sum = sum+data(exp,pt)
NEXT exp
LET mean(pt) = sum/5
NEXT pt
CALL AddBezierGraph(x1,mean,1,"magenta")
get point tmp,tmp2
END